﻿<navigation:Page xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" 
    x:Class="ATSV2.Views.Home" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:services="clr-namespace:ATSV2.Web.Services"
    xmlns:local="clr-namespace:ATSV2.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     
    mc:Ignorable="d"
    d:DesignWidth="1024" d:DesignHeight="760"
    Title="ATSV Basektball" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:my="clr-namespace:ATSV2.Web">
    <Grid x:Name="LayoutRoot" Background="Black">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="550*"/>
            <ColumnDefinition Width="500"/>
            <ColumnDefinition Width="50*"/>
        </Grid.ColumnDefinitions>

        <Image Height="607" Grid.Column="0" Grid.ColumnSpan="3" HorizontalAlignment="Center" Name="imgBackground" Stretch="Uniform" VerticalAlignment="Center" Width="1024" Source="/ATSV2;component/Images/background.png" />



        <Grid HorizontalAlignment="Left" Width="550" VerticalAlignment="Top" Margin="20,50,0,0" Grid.ColumnSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1" >
                    <GradientStop Color="Gray" Offset="0.1" />
                    <GradientStop Color="Silver" Offset="0.25" />
                    <GradientStop Color="WhiteSmoke" Offset="0.75" />
                    <GradientStop Color="White" Offset="1.0" />
                </LinearGradientBrush>
            </Grid.Background>


            <riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:NewsItemSet, CreateList=true}" Height="0" LoadedData="newsItemSetDomainDataSource_LoadedData" Name="newsItemSetDomainDataSource" QueryName="GetNewsItemSetsQuery" Width="0">
                <riaControls:DomainDataSource.DomainContext>
                    <services:ATSVDataContext />
                </riaControls:DomainDataSource.DomainContext>
            </riaControls:DomainDataSource>

            <TextBlock x:Name="TextBox1" TextWrapping="Wrap" Height="25" FontSize="18" FontStyle="Italic" FontWeight="Bold" Text="News" Margin="12,0,0,0" Grid.Row="0">
                <TextBlock.Effect>
                    <DropShadowEffect BlurRadius="20" Direction="360" ShadowDepth="0" Color="White" />
                </TextBlock.Effect>
            </TextBlock>

            <ItemsControl x:Name="News" Grid.Row="1" ItemsSource="{Binding ElementName=newsItemSetDomainDataSource, Path=Data}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <local:NewsItem x:Name="NewsItemPager" Height="240" Width="502" HorizontalAlignment="Center" Margin="12" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>

            <sdk:DataPager x:Name="newsPager" PageSize="1" DisplayMode="PreviousNext" Margin="10" HorizontalAlignment="Center" 
                           Source="{Binding ElementName=newsItemSetDomainDataSource, Path=Data}" NumericButtonCount="{Binding Value, ElementName=numericButtonCount}"
                           AutoEllipsis="True" IsTotalItemCountFixed="False" Grid.Row="2" />
        </Grid>

        <Image Grid.Column="1" Width="450" Height="450" HorizontalAlignment="Right" Margin="0,0,20,0" Name="imgBall" Stretch="Fill" VerticalAlignment="Center" Source="/ATSV2;component/Images/ball_mit_Label.png" />
        <HyperlinkButton Grid.Column="1" x:Name="TeamsButton" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,-180,110,0" Height="80" Width="140"  NavigateUri="/Teams" TargetName="ContentFrame"/>
        <HyperlinkButton Grid.Column="1" x:Name="GaestebuchButton" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,100,80,0" Height="80" Width="180"  NavigateUri="/Gaestebuch" TargetName="ContentFrame"/>
        <HyperlinkButton Grid.Column="1" x:Name="GalerieButton" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,320,200,0" Height="80" Width="130" TargetName="ContentFrame" NavigateUri="/Galerie" />



        <StackPanel Orientation="Vertical" Grid.Column="2">
            <ContentControl Style="{StaticResource FacebookLogoIcon}"/>
            <ContentControl  Style="{StaticResource YoutubeLogoIcon}"/>
        </StackPanel>

    </Grid>
</navigation:Page>